// Import necessary components and libraries
import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import About from '@/components/About'
import Contact from '@/components/Contact'
import Products from '@/components/Products'

// Use Router library
Vue.use(Router)

// Define routes for each page
const router = new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/about',
      name: 'about',
      component: About
    },
    {
      path: '/contact',
      name: 'contact',
      component: Contact
    },
    {
      path: '/products',
      name: 'products',
      component: Products
    }
  ]
})

// Export router for use in main.js
export default router
// This code defines a Vue Router with four routes for a basic website homepage, about page, contact page, and products page.